﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 修改人：x
 * 时间：
 * 修改说明：
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>using System;
using seejee_Backendium.Core.Models;
using seejee_Backendium.Data.Repositores;
using seejee_Backendium.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace seejee_Backendium.Data.Services
{
    public class StoreService : IStoreService
    {
        private readonly StoreRepository _storeRepository;

        public StoreService(StoreRepository storeRepository)
        {
            _storeRepository = storeRepository;
        }
        public PagedResult<StoreInfoDTO> GetStore(int pageIndex, int pageSize, string keyword) => _storeRepository.GetAllStores(pageIndex, pageSize, keyword);

        public Task<IEnumerable<StoreInfoDTO>> GetStoreName() => _storeRepository.GetStoreName();
        //public Task<IEnumerable<string[]>> GetViewName(string cCusName) => _storeRepository.GetViewName(cCusName);
        public Task<IEnumerable<StoreInfoDTO>> GetStore(string cStoreName) => _storeRepository.GetStore(cStoreName);

        public bool InsertStore(StoreInsertDTO stores) => _storeRepository.InsertStore(stores);

        public bool UpdateStore(StoreInsertDTO store) => _storeRepository.UpdateStore(store);
        public bool DeleteStore(string cStoreName) => _storeRepository.DeleteStore(cStoreName);

    }
}
